Skip to content

Add bar-aligned silence padding to Octatrack tracks on sync#10

Merged
pixelate merged 1 commit into
mainfrom
claude/octatrack-track-padding-VJJCb
Mar 13, 2026
Merged

Add bar-aligned silence padding to Octatrack tracks on sync#10
pixelate merged 1 commit into
mainfrom
claude/octatrack-track-padding-VJJCb

Conversation

@pixelate
Copy link
Copy Markdown
Owner

@pixelate pixelate commented Mar 9, 2026

When syncing to the Octatrack, append silence to the end of each track so
that total duration (track + padding) equals a whole multiple of 64 bars.
64 is the Octatrack's maximum slice count, so this guarantees each slice
lands on a bar boundary regardless of how the operator divides the sample.

  • config/devices.yml: add bar_multiple: 64 to the Octatrack device
  • Device: expose bar_multiple attribute loaded from config
  • TrackPadding: new class — computes padding from duration, BPM, and
    bar_multiple using 4/4 time (seconds_per_bar = 240 / bpm)
  • Audio#duration: expose underlying FFMPEG::Movie#duration
  • Audio#transcode: accept padding_seconds: and apply FFmpeg apad
    filter (apad=whole_dur=<total>) when padding is needed
  • FileConverter#convert: thread padding_seconds: through to transcode;
    treat non-zero padding as a reason to transcode even without a format
    conversion
  • Scanner#sync: compute padding per track before convert/copy decision;
    route through the converter whenever padding is required

@pixelate pixelate force-pushed the claude/octatrack-track-padding-VJJCb branch 2 times, most recently from 676c48a to ac6535b Compare March 13, 2026 21:36
Adds a -p / --pad flag to `wavesync sync` that pads each track with
silence so its total length aligns to a multiple of 64 bars (Octatrack
only, requires BPM metadata). Re-converts existing files when the
expected duration changes. Lazy-evaluates BPM in Audio so TagLib is
opened at most once per instance.

https://claude.ai/code/session_01Qwfs9ncsZr2xiKxthYeAQU
@pixelate pixelate force-pushed the claude/octatrack-track-padding-VJJCb branch from ac6535b to 9151c5a Compare March 13, 2026 21:40
@pixelate pixelate merged commit 16bba47 into main Mar 13, 2026
@pixelate pixelate deleted the claude/octatrack-track-padding-VJJCb branch March 13, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants